window.onload=function(){

    let nineDiv=document.querySelectorAll('.main div')

    for(var i=0;i<nineDiv.length;i++){
        nineDiv[i].addEventListener('click',function(){
          console.log(this.id)
          if(this.id=='1'){
            location.href='../weather.html'
          }else if(this.id=='2'){
            location.href='../joke.html'
          }else if(this.id=='3'){
            location.href='../vairus.html'
          }else if(this.id=='4'){
            location.href='../petroleum.html'
          }else if(this.id=='5'){
            location.href='../news.html'
          }else if(this.id=='6'){
            location.href='../constellation.html'
          }else if(this.id=='7'){
            location.href='../delivery.html'
          }else if(this.id=='8'){
            location.href='../citySearch.html'
          }else{
            location.href='../permanent.html'
          }
        })
    }
}